-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eastron SDM120 energy meter - new sensor #2694
Conversation
Conflicts: sonoff/language/it-IT.h
Conflicts: sonoff/language/it-IT.h
Hi,
how do you connect the SDM to the ESP? Do you use a MAX3485 converter as
the SDM is a RS485 Modbus device?
Greetings,
Heiko.
Am 11.05.2018 um 11:06 schrieb Gennaro Tortone:
…
sdm120-home
<https://user-images.githubusercontent.com/6534590/39916618-45399b3c-550b-11e8-8f7f-084d9ffec7aa.png>
sdm120-config
<https://user-images.githubusercontent.com/6534590/39916624-47e03526-550b-11e8-8d84-8c89bf0a61a5.png>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2694 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACdAcSz0gWWvhWHqecLJny2xMENZDpEyks5txVSBgaJpZM4T7IdH>.
|
Hi @altelch I use this RS485<->TTL adapter
|
Thnx Gennaro!! Even my latest serial changes are incorporated! Will release soon. |
yes, also Amazon says RS485 to TTL but it is wrong... they mount MAX785 IC that is a RS485 to RS422 (like RS232 but differential) |
can you please share a link of one i can purchase, darn another month waiting :( |
another strange thing, i tried to ground the RE to make it low to be alwaysing receiving, ant the tasmota send the command to retrieve power but says unknow command! in the SDM energy meter github i found this |
take into account that RS422 has +6V/-6V levels (https://en.wikipedia.org/wiki/RS-422) instead UART-TTL has 0V-3.3V... I suggest you to disconnect this adapter because there is a risk to damage RX/TX pins of ESP |
This is the adapter I bought on Amazon (Italy): https://www.amazon.it/WINGONEER-alladattatore-seriale-convertitore-livello/dp/B06XHH6B6R it is also available on Aliexpress... |
hi, i have made it to work with the SDM library, there is a Dere pin that we can trigger to enable the usage of max485, now the reall question is how can we include that in tasmota, would be awesome to make it work the same way. #define DERE_PIN 4 //digital pin for control MAX485 DE/RE lines (connect DE & /RE together to this pin) |
Hi @rflx18, the pin you are reporting is available on RS485/RS422 adapter while there is not such pin in RS384/UART-TTL... btw this has to be included in TasmotaSerial library |
sorry gtortone, this is out of my league :), is it possible to include that pin for tasmota porposes also? |
I don't know TasmotaSerial library in depth... but take into account that following your request you need an additional pin (TX, RX, DERE) that on a Sonoff device is not always a simple thing... |
i know that, im using a nodemcu or a wemos, and the goal of the tasmota is to use more than 3 gpoio :) |
@localhost61 infact you need this adapter: https://www.amazon.it/WINGONEER-alladattatore-seriale-convertitore-livello/dp/B06XHH6B6R that works with 3.3V/5V voltage levels: |
5.13.1a * Add Eastron SDM120 energy meter (arendst#2694)
@gtortone, your adapter is very interesting because |
@localhost61 this is my configuration of SDM120 for Sonoff Basic: I suggest you to double check speed of SDM module and speed inside Sonoff-Tasmota configuration file user_config.h (SDM120_SPEED or SDM630_SPEED) |
Thanks for the tips Gennaro! I did the same, SDM-TX on Serial In and SDM-RX on Serial Out, it's logical ! |
Hi,
|
Shame on me! The adapter pinout doesn't match the Dual R2. RX and TX are twisted.
|
@localhost61 I'm happy you solve your communication problem ! |
maybe not when compiled with core 2.3.0 which defaults now in platformio.ini Where two SDM120 are powered thru a SDM230 on the same bus at 9600,8N1 but with different ID: Here is how I connected the adapter: |
@gtortone I would like to see if I can change the code in order to add a command to change the modbus slave target ID in order to monitor my three devices, that should be rather straightful. |
@localhost61 Xavier, just got myself a SDM230 and seeing how you hooked it up confirms my connection. I see you do not use the Gnd of the RS485 interface. Is it not needed? I disconnected mine too and it seems to work just fine indeed. I connected only a simple load of 15W so that's probably an issue but I see the Export Reactive value incrementing together with the Import Active and Total counters. I cannot explain this as I'm definitly not supplying power. Edit1: Forget my Export Reactive question. As it is negative it is probably measured as export. Now I connected a 75W incandescant bulb and reactive power is now 0 (as expected) and Export Reactive stopped updating. |
I guess that Gnd may be used for long distance ModBus for the Shield, not used with a twisted pair |
I just tested with a vacuum cleaner. It's power factor is optimized at full power, but at minimal power, it's only 0.5 and I could verify that as an inductive load it increase import reactive energy counter. The export energy counter remains unchanged. I currently have a "capital" of 44kVAr in the export energy counter because my SDM230 was loaded 24/7 by 2 SDM120 that are seen as very highly capacitive loads. I notice right now that there is a confusion in my translation, but maybe in the english version too, you tell me... |
I was wrong, |
Hi,
I just finished integration of Eastron SDM120 energy meter (http://www.eastrongroup.com/productsview/14.html);
please skip my VS Code setup files included in this PR...
Regards,
Gennaro